namespace MonitorTemperatura.DataAccess
{
    using Db4objects.Db4o;
    using System;

    public class StopServer : Util
    {
        public static void Stop()
        {
            IObjectContainer container = null;
            try
            {
                container = Db4oFactory.OpenClient("localhost", PORT, USER, PASS);
            }
            catch (Exception exception)
            {
                System.Diagnostics.EventLog.WriteEntry("MonitorTemperatura", exception.ToString());
            }
            if (container != null)
            {
                container.Ext().Configure().ClientServer().GetMessageSender().Send(new StopServer());
                container.Close();
            }
        }
    }
}

